//加载已经添加的竞猜项目
loadGuessItem();

var i = 0;
function loadGuessItem() {
	var id = $("#id").val();
	var html = '';
	$.ajax({//发送AJAX请求
		type : "POST",
		url : "/system/guess/loadGuessItem?guessId="+id,
		success : function(data) {
			if(data != null && data != '') {
				data = data.data;
				$.each(data, function(){
					i++;
					html += '<tr>';
					html += '<td style="text-align: center;">';
					html += '<input maxlength="50" class="form-control" type="text" value="'+i+'" required readonly>';
					html += '</td>';
					html += '<td style="text-align: center;" id="selected'+i+'">';
					html += '<input maxlength="50" id="guessItemDOList['+(i-1)+'].id" name="guessItemDOList['+(i-1)+'].edit.js" class="form-control" type="hidden" value="'+this.id+'" required>';
					html += '<input maxlength="50" id="guessItemDOList['+(i-1)+'].guessName" name="guessItemDOList['+(i-1)+'].guessName" class="form-control" type="text" value="'+this.guessName+'" required readonly>';
					html += '</td>';
					/*html += '<td style="text-align: center;">';
					html += '<input maxlength="50" id="guessItemDOList['+(i-1)+'].guessOdds" name="guessItemDOList['+(i-1)+'].guessOdds" class="form-control" type="text" value="'+this.guessOdds+'" required readonly>';
					html += '</td>';*/
					html += '</tr>';
				});
				$("#tbody1").append(html);
			}
		}
	});
}